import request from '@/router/axios';
export const getCountByStatus = (status) => {
  return request({
    url: '/api/blade-platform/patient/getCountByStatus',
    method: 'post',
    params: {
      status
    }
  })
}
export const getList = (current, size, params, deptId) => {
  return request({
    url: '/api/blade-platform/patient/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      deptId,
    }
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/blade-platform/patient/detail',
    method: 'get',
    params: {
      id,
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/blade-platform/patient/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/blade-platform/patient/save',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/blade-platform/patient/update',
    method: 'post',
    data: row
  })
}
//详情左树
export const getPatienFileTree = ( params) => {
  return request({
    url: '/api/blade-platform/checkRecord/tree',
    method: 'get',
    params: {
      ...params,
    }
  })
}
export const getCheckList = (params) => {
  return request({
    url: '/api/blade-platform/checklist/checklistDetail',
    method: 'get',
    params:{
      ...params
    }
  })
}
export const checkAdd = (row) => {
  return request({
    url: '/api/blade-platform/checklist/save',
    method: 'post',
    data: row
  })
}
export const checkUpdate = (row) => {
  return request({
    url: '/api/blade-platform/checklist/update',
    method: 'post',
    data: row
  })
}

export const getDiagnoseList = (params) => {
  return request({
    url: '/api/blade-platform/checklist/list',
    method: 'get',
    params:{
      ...params
    }
  })
}
export const getCharacteristictargetData = (params) => {
  return request({
    url: '/api/blade-platform/checkitem/getCharacteristictargetData',
    method: 'get',
    params:{
      ...params      
    }
  })
}
export const diagnostic = (params) => {
  return request({
    url: '/api/blade-platform/diagnosticrecord/diagnostic',
    method: 'get',
    params:{
      ...params
    }
  })
}
export const treeRemove = (id) => {
  return request({
    url: '/api/blade-platform/checklist/removeByChecklistId',
    method: 'post',
    params: {
      id,
    }
  })
}
export const checkEdit = (row) => {
  return request({
    url: '/api/blade-platform/checklist/update',
    method: 'post',
    data: row
  })
}
// 首页获取列表数据
export const getHistoricalRecord = (row) => {
  return request({
    url: '/api/blade-platform/home/getHistoricalRecord',
    method: 'get',
    params: row
  })
}
// 获取患者基本信息
export const getDiagnosticPatient = (row) => {
  return request({
    url: '/api/blade-platform/home/getDiagnosticPatient',
    method: 'get',
    params: row
  })
}
